﻿<%@ Page Language="C#" MasterPageFile="~/Admin/QuanLy.master" AutoEventWireup="true"
    CodeFile="QuanLyLoaiKH.aspx.cs" Inherits="Admin_QuanLyLoaiKH" Title="Quản lý cấp độ"
    Theme="Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="content_t">
        &nbsp;</div>
    <div id="content">
        <div align="center" id="list">
            <h3>
                Danh sách sản phẩm</h3>
            <asp:GridView ID="GridView1" SkinID="GridView" runat="server" AutoGenerateColumns="False"
                OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCancelingEdit="GridView1_RowCancelingEdit"
                OnRowDeleting="GridView1_RowDeleting" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
                <Columns>
                    <asp:TemplateField HeaderText="Mã loại khách hàng">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("MaLoaiKhachHang") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox CssClass="TextBox" ID="TextBox1" runat="server" Text='<%# Bind("MaLoaiKhachHang") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Cấp độ">
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("CapDo") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox CssClass="TextBox" ID="TextBox2" runat="server" Text='<%# Bind("CapDo") %>'></asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Giảm giá">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("GiamGia") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox CssClass="TextBox" ID="TextBox3" runat="server" Text='<%# Bind("GiamGia") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:TemplateField>
                    <asp:CommandField ShowEditButton="True" CancelText="Bỏ" EditText="Sửa" UpdateText="Sửa">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:CommandField>
                    <asp:CommandField ShowDeleteButton="True" DeleteText="Xóa">
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    </asp:CommandField>
                </Columns>
            </asp:GridView>
        </div>
        <div align="center" id="form">
            <asp:Table ID="tblThem" SkinID="Table" runat="server" Visible="False">
                <asp:TableHeaderRow SkinID="TableHeaderRow">
                    <asp:TableHeaderCell ColumnSpan="2">
                        Chi tiết cấp độ mới
                    </asp:TableHeaderCell>
                </asp:TableHeaderRow>
                <asp:TableRow>
                    <asp:TableCell SkinID="TableCell">
                        Cấp độ
                    </asp:TableCell>
                    <asp:TableCell SkinID="TableCell">
                        <asp:TextBox ID="TextBox1" runat="server" Width="150px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                            ErrorMessage="(*)"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell SkinID="TableCell">
                        Giảm giá
                    </asp:TableCell>
                    <asp:TableCell SkinID="TableCell">
                        <asp:TextBox ID="TextBox2" runat="server" Width="122px"></asp:TextBox>
                        (%)
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                            ErrorMessage="(*)"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableFooterRow SkinID="TableFooterRow">
                    <asp:TableHeaderCell ColumnSpan="2">
                        <asp:Button ID="btnLuu" runat="server" Text="Lưu" OnClick="btnLuu_Click" />
                        <asp:Button ID="btnHuy" runat="server" Text="Hủy" OnClick="btnHuy_Click" CausesValidation="False" />
                    </asp:TableHeaderCell>
                </asp:TableFooterRow>
            </asp:Table>
            <asp:Button ID="btnThem" runat="server" Text="Thêm cấp độ khách hàng" OnClick="btnThem_Click"
                CausesValidation="False" />
        </div>
    </div>
    <div id="content_b">
        &nbsp;</div>
</asp:Content>
